package com.haixiaoke.saas.common.weChat.service;

import com.haixiaoke.saas.common.core.domain.AjaxResult;
import com.haixiaoke.saas.common.weChat.domain.*;

import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.NotBlank;

/**
 * @author panda
 * @Date 2024/4/13
 **/
public interface WeChatService {

    /**
     * 微信下单
     * @param unifiedOrder
     * @return
     */
    AjaxResult unifiedOrder(UnifiedOrder unifiedOrder);

    /**
     * 微信扫码支付
     * @param unifiedOrder
     * @return
     */
    AjaxResult nativeOrder(UnifiedOrder unifiedOrder);

    /**
     * 微信退款
     * @return
     */
    AjaxResult refundOrder(RefundOrder refundOrder);

    /**
     * 校验签名
     * @param parseParam     回调请求参数
     * @param accountApiKey  微信支付分配的商户号密钥
     */
    boolean signCheck(ParseParam parseParam, String accountApiKey);

    RefundReqInfo getReqInfo(RefundParam refundParam);
}
